
package com.be.beadmin.quality.repository;

import com.be.beadmin.quality.entity.InspectionTemplate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
* @author ljh
* @date 2023-05-18
**/
public interface InspectionTemplateRepository extends JpaRepository<InspectionTemplate, String>, JpaSpecificationExecutor<InspectionTemplate> {

    InspectionTemplate findInspectionTemplateByIdAndDelete(String id, Integer delete);


    InspectionTemplate findInspectionTemplateByProductTypeAndStateAndDeleteAndNameLike(String productType, String state, Integer delete,String name);
    InspectionTemplate findInspectionTemplateByProductTypeAndStateAndDeleteAndTypeLike(String productType, String state, Integer delete,String type);

    List<InspectionTemplate> findInspectionTemplateByStateAndDeleteAndType(String state, Integer delete, String type);

    InspectionTemplate findInspectionTemplateById(String id);


    InspectionTemplate findInspectionTemplateByNameAndProductTypeAndDelete(String name, String productType, Integer delete);

    InspectionTemplate findInspectionTemplateByProductTypeAndTypeAndDelete(String productType, String type, Integer delete);

    InspectionTemplate findInspectionTemplateByProductTypeAndTypeAndDeleteAndNameLike(String productType, String type, Integer delete,String name);

    InspectionTemplate findInspectionTemplateByProductTypeAndProcessIdAndStateAndDelete(String productType, String processIdForInspection, String number, int i);

    InspectionTemplate findInspectionTemplateByProductTypeAndProcessNameAndStateAndDelete(String productType, String processNameForInspection, String number, int i);

    InspectionTemplate findInspectionTemplateByTypeAndProductTypeAndProcessNameAndDelete(String 过程检验, String productType, String processName, int i);
}